package com.jwgf.smarowindingmachine_unity.ui;

import com.jwgf.smarowindingmachine_unity.R;

import android.content.Context;
import android.widget.TextView;



public class WarningDialog {
	private static CustomWarningDialog warn_dialog;
	public static void show(Context ctx, String warning){
		if (warn_dialog == null)
			warn_dialog = new CustomWarningDialog(ctx);
		TextView text = (TextView) warn_dialog.findViewById(R.id.warning_text);
		text.setText(warning);
		warn_dialog.show();
	}
	
	public static void hide(){
		if (warn_dialog != null){
			if (warn_dialog.isShowing()){
				warn_dialog.dismiss();
			}
		}
	}
}
